package com.guigu.lqxm.wp.controllerwp;

import com.guigu.lqxm.pojo.Test;
import com.guigu.lqxm.wp.servicewp.impl.AddServlet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("add")
public class AddController {
    @Autowired(required = false)
    AddServlet addSer;
    @GetMapping
    @ResponseBody
    public int add(Test test){
        int add = addSer.add(test);
        return add;
    }
}
